<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>我的相册</title>
<link rel="stylesheet" type="text/css" href="<?php echo assets('css/style.css')?>">
</head>
<body>
<div id="header">
  <div id="logo">Gallery</div>
  <ul>
    <li><a href="javascript:;"><?php echo $user->userName ?></a></li>
    <li><a href="<?php echo url('gallery/create') ?>">新建相册</a></li>
    <li><a href="<?php echo url('gallery/logout') ?>">退出登录</a></li>
  </ul>
</div>
<div id="content">
<?php if(count($galleryList) == 0): ?>
    <div id="new-gallery">还没有任何相册，点这里<a href="<?php echo url('gallery/create') ?>">创建</a>一个吧</div>
<?php else: ?>
  <div id="wrapper">
    <ul>
      <?php foreach ($galleryList as $gallery): ?>
      <li>
        <a style="position: relative;top: 25px;left: 120px; color: #fff;" href="<?php echo url('gallery/deleteGallery',['id' => $gallery->id])?>">删除</a>
        <a href="<?php echo url('gallery/detail', ['id' => $gallery->id]) ?>">
          <img src="<?php echo $gallery->art ?>" />
        </a>
        <div>
          <h4>
            <a href="<?php echo url('gallery/detail', ['id' => $gallery->id]) ?>"><?php echo $gallery->title ?>
            </a>
          </h4>
        </div>
      </li>
      <?php endforeach; ?>
    </ul>
  </div>
<?php endif; ?>
</div>
<div id="footer">
   @copyright wanczy-php06 use for PHP OOP demo
</div>
</body>
</html>